<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>定制</title>
    <link href="../css/style.css" rel="stylesheet">
    <link href="../css/send.css?v=4" rel="stylesheet">
    <link rel="stylesheet" href="../css/layui/css/layui.css" media="all">
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script src="../js/jquery-1.8.1.min.js"></script>
    <script src="../js/iscroll.js"></script>
</head>

<body>
    <div class="head" style="border-bottom:1px solid #eee;">
        <img src="../icon/cha.png" onclick="window.history.back()" /> 定制
    </div>
    <div class="top-empty"></div>
    <div class="dz-add">
        <div class="single" onclick="qiehuan(this,1)">
            <span class="active">有预算
                <hr class="active">
            </span>
        </div>
        <div class="single" onclick="qiehuan(this,2)">
            <span class="">无预算
                <hr class="">
            </span>
        </div>
        <div class="clear"></div>
    </div>
    <!-- 有预算 -->
    <div class="show1">
        <div class="xz_add" style="padding-top:10px;">
            <textarea placeholder="定制要求及说明并上传图纸和图片"></textarea>
        </div>
        <div class="xz_img" style="padding-bottom:20px;">
            <div class="add_img" id="demo2">
            </div>
            <img src="../icon/add.png" id="test2">
            <div class="clear"></div>
        </div>
        <!-- 联系人等表单信息 -->
        <div class="dz-input">
            <div class="single">
                <label>联系人
                    <input type="text" placeholder="请输入联系人信息">
                </label>
            </div>
            <div class="single">
                <label>手机号
                    <input type="text" placeholder="请输入手机号码">
                </label>
            </div>
            <div class="single">
                <label>预算
                    <input type="text" placeholder="请输入您的预算">
                </label>
            </div>
            <div class="single">
                <label>定制天数
                    <input type="text" placeholder="请输入定制天数">
                </label>
            </div>
        </div>
    </div>
    <!-- 无预算 -->
    <div class="show2" style="display:none">
            <div class="xz_add" style="padding-top:10px;">
                <textarea placeholder="定制要求及说明并上传图纸和图片"></textarea>
            </div>
            <div class="xz_img" style="padding-bottom:20px;">
                <div class="add_img" id="demo2">
                </div>
                <img src="../icon/add.png" id="test2">
                <div class="clear"></div>
            </div>
            <!-- 联系人等表单信息 -->
            <div class="dz-input">
                <div class="single">
                    <label>联系人
                        <input type="text" placeholder="请输入联系人信息">
                    </label>
                </div>
                <div class="single">
                    <label>手机号
                        <input type="text" placeholder="请输入手机号码">
                    </label>
                </div>
              
                <div class="single">
                    <label>定制天数
                        <input type="text" placeholder="请输入定制天数">
                    </label>
                </div>
            </div>
        </div>
    <br>
    <br>
    <br>
    <button class="add-fabu">确定发布</button>
</body>
<script src="../css/layui/layui.js" charset="utf-8"></script>
<script>
    layui.use('upload', function () {
        var $ = layui.jquery
            , upload = layui.upload;
        //多图片上传
        upload.render({
            elem: '#test2'
            , url: 'add.json'
            , multiple: false
            , before: function (obj) {
                //预读本地文件示例，不支持ie8
                obj.preview(function (index, file, result) {
                    $('#demo2').append('<img src="' + result + '" alt="' + file.name + '" class="layui-upload-img">')
                });
            }
            , done: function (res) {
                //上传完毕
            }
        });
    });
</script>
<script>
    function qiehuan(th, status) {
        $(".dz-add span").removeClass("active");
        $(".dz-add hr").removeClass("active");
        $(th).find('span').addClass("active");
        $(th).find('hr').addClass("active");
        if (status == 1) {
            $(".show1").css("display", "block");
            $(".show2").css("display", "none");
        } else {
            $(".show1").css("display", "none");
            $(".show2").css("display", "block");
        }
    }
</script>

</html>